package com.example.demo.controller;

import com.example.demo.entity.Score;
import com.example.demo.service.ScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.ws.Action;

/**
 * @Author :蕉绿
 * @Date : 2023/2/24 23:49
 * @Version : V1.0
 * @Description :
 */
@RestController
@RequestMapping("/score")
public class ScoreController {
    @Autowired
    private ScoreService service;
    @RequestMapping("/sc")
    Score getScoreById(Integer id) {
        if(id == null) return null;
        return service.getScoreById(id);
    }
}
